Routing messages based on geolocation information associated with both the messages and with subscribers

ABSTRACT

Embodiments relate to method and computer program products for routing messages based on geolocation information. Aspects include receiving a message from a publisher, computing a geo-hash for the message based on a location associated with the message, and traversing a geo-hash tree associated with a subscriber to determine if the geo-hash of the message corresponds to a geo-hash grid in the geo-hash tree. Based on determining that the geo-hash of the message corresponds to an identified geo-hash grid in the geo-hash tree, a point in a polygon algorithm is performed to determine if the location associated with the message is inside an area of interest associated with the identified geo-hash grid. If the location associated with the message is inside the area of interest, the message is forwarded to the subscriber.

BACKGROUND

The present invention relates generally to routing messages based ongeolocation information and more particularly to routing messages in apublish/subscribe system based on geolocation information.

In general, a publish/subscribe messaging system delivers messages fromproducers to consumers by routing messages based on topics and predicateevaluation. Recently, there has been a desire to route messages based onlocation information such as the location of the subscriber and/or thepublisher. As the number of internet connected devices continues togrow, the need to route a large volume of messages at a predictably lowlatency on geolocation information and to route messages on correlatedsensor attribute and location information, will drastically increase theamount of messages to be routed based on location information.

Currently available messaging systems cannot keep up with the volume andlatency requirements of real time messaging while accurately routingmessages based on location information. Instead, in order to keep upwith the with the volume and latency requirements of real time messagingcurrently available messaging systems sacrifice the accuracy of thelocation information used for routing messages. For example, many ofthese systems use a technique known as geo-hashing, which dividesgeographical areas into fixed size rectangles that are associated with ageo-hash code. Due to the fact that actual geographic areas of interestare seldom rectangles that perfectly align with a rectangle associatedwith a specific geo-hash code, geo-hashing suffers from both falsepositives and false negatives which can cause negative consequences.

SUMMARY

Embodiments include methods routing messages based on geolocationinformation. The method includes receiving a message from a publisher,computing a geo-hash for the message based on a location associated withthe message, and traversing one or more geo-hash trees associated withone or more subscribers to determine if the geo-hash of the messagecorresponds to a geo-hash grid in the one or more geo-hash trees. Basedon determining that the geo-hash of the message corresponds to anidentified geo-hash grid in the one or more geo-hash trees, the methodincludes performing a point in a polygon algorithm to determine if thelocation associated with the message is inside an area of interestassociated with the identified geo-hash grid. Based on determining thatthe location associated with the message is inside the area of interestassociated with the identified geo-hash grid, the method includesforwarding the message to one of the one or more subscribers associatedwith the geo-hash tree containing the identified geo-hash grid.

Embodiments also include a computer program product for routing messagesbased on geolocation information, the computer program product includinga tangible storage medium readable by a processing circuit and storinginstructions for execution by the processing circuit for performing amethod. The method includes receiving a message from a publisher,computing a geo-hash for the message based on a location associated withthe message, and traversing one or more geo-hash trees associated withone or more subscribers to determine if the geo-hash of the messagecorresponds to a geo-hash grid in the one or more geo-hash trees. Basedon determining that the geo-hash of the message corresponds to anidentified geo-hash grid in the one or more geo-hash trees, the methodincludes performing a point in a polygon algorithm to determine if thelocation associated with the message is inside an area of interestassociated with the identified geo-hash grid. Based on determining thatthe location associated with the message is inside the area of interestassociated with the identified geo-hash grid, the method includesforwarding the message to one of the one or more subscribers associatedwith the geo-hash tree containing the identified geo-hash grid.

Embodiments further include a messaging system for routing messagesbased on geolocation information, the messaging system comprising aprocessor configured for performing a method. The method includesreceiving a message from a publisher, computing a geo-hash for themessage based on a location associated with the message, and traversingone or more geo-hash trees associated with one or more subscribers todetermine if the geo-hash of the message corresponds to a geo-hash gridin the one or more geo-hash trees. Based on determining that thegeo-hash of the message corresponds to an identified geo-hash grid inthe one or more geo-hash trees, the method includes performing a pointin a polygon algorithm to determine if the location associated with themessage is inside an area of interest associated with the identifiedgeo-hash grid. Based on determining that the location associated withthe message is inside the area of interest associated with theidentified geo-hash grid, the method includes forwarding the message toone of the one or more subscribers associated with the geo-hash treecontaining the identified geo-hash grid.

Additional features and advantages are realized through the techniquesof the present invention. Other embodiments and aspects of the inventionare described in detail herein and are considered a part of the claimedinvention. For a better understanding of the invention with theadvantages and the features, refer to the description and to thedrawings.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

The subject matter which is regarded as embodiments is particularlypointed out and distinctly claimed in the claims at the conclusion ofthe specification. The forgoing and other features, and advantages ofthe embodiments are apparent from the following detailed descriptiontaken in conjunction with the accompanying drawings in which:

FIG. 1 depicts a block diagram of a system for routing messages based ongeolocation information in accordance with an exemplary embodiment;

FIG. 2 depicts a block diagram of a computing system in accordance withan exemplary embodiment;

FIG. 3 depicts a block diagram illustration of a method for creating ageo-hash tree in accordance with an exemplary embodiment;

FIG. 4 depicts a geo-hash tree in accordance with an exemplaryembodiment; and

FIG. 5 depicts a block diagram illustration of a method for routingmessages based on geolocation in accordance with an exemplaryembodiment.

DETAILED DESCRIPTION

Referring to the drawings in more detail, and particularly referring toFIG. 1, a system 100 for routing messages based on geolocationinformation in accordance with an exemplary embodiment is shown. Asillustrated the system 100 includes one or more subscribers 102 and oneor more publishers 104 that are in communication with a messaging system110. In exemplary embodiments, each of the publishers 104 utilizes themessaging system 110 to set a geographic area associated with messagesthat the publishers 104 will publish through the messaging system 110.For example, a publisher, such as a local merchant, may create ageographic area of a small area around their store to publish messagesregarding sales, events and the like. Likewise another publisher, suchas local newspaper, may create several geographic areas that includeareas for each neighborhood in a large metropolitan area and anothergeographic area that includes the entire metropolitan area.

In exemplary embodiments, each of the subscribers 102 utilizes themessaging system 110 to subscribe to receive published messages from oneor more publishers 104 based on a geographic area set by the subscriber.For example, the subscribers use the messaging system to create ageographic area of interest that corresponds to an area for which theywould like to receive published messages. In exemplary embodiments, thesubscribers may create a plurality of geographic area of interest andmay set other limitations on when they would like to receive messages.For example, a subscriber may create a geographic area around his home,one for the area around his office and one that covers the area inbetween the two. The subscriber may wish to receive all publishedmessages relating to news and community information regarding the areaaround his home. However, the subscriber may wish to only receivepublished messages relating to traffic information regarding the areaaround his office during business days. In exemplary embodiments, thesubscribers may use the messaging system to select messages to receivebased on one or more of a location, day and time, subject matter or thelike.

In exemplary embodiments, the messaging system 110 includes a memory 112that may include, but is not limited to, one or more subscriber trees114, also referred to herein as geo-hash trees, that each corresponds toone of the subscribers 102 and location data 116. The location data 116may include, but is not limited to, the geographic areas of interestthat were defined by the subscribers 102 and the publishers 104. Inexemplary embodiments, the subscribers 102, the publishers 104 and themessaging system 110 may be embodied in a computer system as shown anddescribed with reference to FIG. 2. In exemplary embodiments thesubscribers 102 and the publishers 104 may be embodied in smartphones,tablets or other computing devices.

FIG. 2 illustrates a block diagram of an exemplary computer system 200for use with the teachings herein. The methods described herein can beimplemented in hardware software (e.g., firmware), or a combinationthereof. In an exemplary embodiment, the methods described herein areimplemented in hardware, and is part of the microprocessor of a specialor general-purpose digital computer, such as a personal computer,workstation, minicomputer, or mainframe computer. The system 200therefore includes general-purpose computer 201.

In an exemplary embodiment, in terms of hardware architecture, as shownin FIG. 2, the computer 201 includes a processor 205, memory 210 coupledvia a memory controller 215, a storage device 220, and one or more inputand/or output (I/O) devices 240, 245 (or peripherals) that arecommunicatively coupled via a local input/output controller 235. Theinput/output controller 235 can be, for example, but not limited to, oneor more buses or other wired or wireless connections, as is known in theart. The input/output controller 235 may have additional elements, whichare omitted for simplicity, such as controllers, buffers (caches),drivers, repeaters, and receivers, to enable communications. Further,the local interface may include address, control, and/or dataconnections to enable appropriate communications among theaforementioned components. The storage device 220 may include one ormore hard disk drives (HDD), solid state drives (SSD), or any othersuitable form of storage.

The processor 205 is a computing device for executing hardwareinstructions or software, particularly that stored in memory 210. Theprocessor 205 can be any custom made or commercially availableprocessor, a central processing unit (CPU), an auxiliary processor amongseveral processors associated with the computer 201, a semiconductorbased microprocessor (in the form of a microchip or chip set), amacroprocessor, or generally any device for executing instructions. Theprocessor 205 may include a cache 270, which may be organized as ahierarchy of more cache levels (L1, L2, etc.).

The memory 210 can include any one or combination of volatile memoryelements (e.g., random access memory (RAM, such as DRAM, SRAM, SDRAM,etc.)) and nonvolatile memory elements (e.g., ROM, erasable programmableread only memory (EPROM), electronically erasable programmable read onlymemory (EEPROM), programmable read only memory (PROM), tape, compactdisc read only memory (CD-ROM), disk, diskette, cartridge, cassette orthe like, etc.). Moreover, the memory 210 may incorporate electronic,magnetic, optical, and/or other types of storage media. Note that thememory 210 can have a distributed architecture, where various componentsare situated remote from one another, but can be accessed by theprocessor 205.

The instructions in memory 210 may include one or more separateprograms, each of which comprises an ordered listing of executableinstructions for implementing logical functions. In the example of FIG.2, the instructions in the memory 210 include a suitable operatingsystem (OS) 211. The operating system 211 essentially controls theexecution of other computer programs and provides scheduling,input-output control, file and data management, memory management, andcommunication control and related services.

In an exemplary embodiment, a conventional keyboard 250 and mouse 255can be coupled to the input/output controller 235. Other output devicessuch as the I/O devices 240, 245 may include input devices, for examplebut not limited to a printer, a scanner, microphone, and the like.Finally, the I/O devices 240, 245 may further include devices thatcommunicate both inputs and outputs, for instance but not limited to, anetwork interface card (NIC) or modulator/demodulator (for accessingother files, devices, systems, or a network), a radio frequency (RF) orother transceiver, a telephonic interface, a bridge, a router, and thelike. The system 200 can further include a display controller 225coupled to a display 230. In an exemplary embodiment, the system 200 canfurther include a network interface 260 for coupling to a network 165.The network 265 can be an IP-based network for communication between thecomputer 201 and any external server, client and the like via abroadband connection. The network 265 transmits and receives databetween the computer 201 and external systems. In an exemplaryembodiment, network 265 can be a managed IP network administered by aservice provider. The network 265 may be implemented in a wirelessfashion, e.g., using wireless protocols and technologies, such as Wi-Fi,WiMax, etc. The network 265 can also be a packet-switched network suchas a local area network, wide area network, metropolitan area network,Internet network, or other similar type of network environment. Thenetwork 265 may be a fixed wireless network, a wireless local areanetwork (LAN), a wireless wide area network (WAN) a personal areanetwork (PAN), a virtual private network (VPN), intranet or othersuitable network system and includes equipment for receiving andtransmitting signals.

If the computer 201 is a PC, workstation, intelligent device or thelike, the instructions in the memory 210 may further include a basicinput output system (BIOS) (omitted for simplicity). The BIOS is a setof essential routines that initialize and test hardware at startup,start the OS 211, and support the transfer of data among the storagedevices. The BIOS is stored in ROM so that the BIOS can be executed whenthe computer 201 is activated.

When the computer 201 is in operation, the processor 205 is configuredto execute instructions stored within the memory 210, to communicatedata to and from the memory 210, and to generally control operations ofthe computer 201 pursuant to the instructions.

Referring now to FIG. 3, a flow chart diagram of a method 300 forcreating a geo-hash tree in accordance with an exemplary embodiment isshown. As shown at block 302, the method 300 includes receiving adefinition of an area of interest from a user. In exemplary embodiments,the definition of an area of interest is a geographic area that isspecified by a user, which may be a publisher or a subscriber. Inexemplary embodiments, the user may create the definition of the area ofinterest by drawing the area of interest on a map. For example, a usermay use a GUI interface to draw a polygon representing an area ofinterest. In another example, a user may use a GUI interface to select apoint of interest and a desired radius to create the definition area ofinterest.

Next, as shown at block 304, the method 300 includes computinggeo-hashes for a plurality of points along the perimeter of the area ofinterest. For example, if the area of interest is a polygon, a geo-hashis computed for each corner of the polygon. In another example, if thearea of interest is a circle, a geo-hash is computed for a plurality ofpoints along the circumference of the circle. As used herein a geo-hashis a well-known hierarchical spatial data structure which subdividesspace into buckets of grid shape. In exemplary embodiments, a geo-hashis computed based on converting numerical latitude and longitudecoordinates to a base 32 numbering system. In general, geo-hashes offerarbitrary precision by removing characters from the end of the code toreduce its size.

Next, as shown at block 306, the method 300 includes comparing thecommon part of the geo-hashes for the plurality of points along theperimeter of the area of interest to find the geo-hash grid thatcontains the entire area of interest. Next, as shown at block 308, themethod includes constructing a geo-hash tree based on the geo-hashes forone or more areas of interest specified by a user. In exemplaryembodiments, the geo-hash tree is constructed by adding each of thegeo-hash grids that contains each of the entire area of interestsspecified by the user to a tree structure.

FIG. 4 illustrates a geo-hash tree 400 in accordance with an exemplaryembodiment. As shown the geo-hash tree 400 includes seven geo-hashgrids, which each correspond to a geo-hash link 402 that contains theentire area of interest. For example, geo-hash grid DR corresponds to ageo-hash link 402 that contains the entire area of interest illustratedas “1.” Likewise, geo-hash grid GCW25 corresponds to a geo-hash link 402that contains the entire area of interest illustrated as “3.” As thegeo-hash grid becomes longer, that is as the number of characters in thegeo-hash grid increases, the area represented becomes smaller. Inexemplary embodiments, the geo-hash link 402 points to a storeddefinition of the actual geographic area of interest specified by theuser that corresponds to the geo-hash grid.

Referring now to FIG. 5, a flow chart diagram of a method 500 forrouting messages based on geolocation in accordance with an exemplaryembodiment is shown. As shown at block 502, the method 500 includesreceiving an incoming message from a publisher. Next, as shown at block504, the method 500 includes computing a geo-hash based on a locationassociated with the message. After the geo-hash associated with themessage is computed, the method 500 includes traversing one or moregeo-hash trees associated with one or more subscribers to determine ifthe geo-hash of the message corresponds to a geo-hash grid in the one ormore geo-hash trees, as shown at block 506. In exemplary embodiments,determining if the geo-hash of the message corresponds to a geo-hashgrid in the one or more geo-hash trees includes performing longestprefix match between the geo-hash of the message and the geo-hash gridsof the one or more geo-hash trees.

Continuing with reference to FIG. 5, based on determining that themessage corresponds to an identified geo-hash grid in the one or moregeo-hash trees, the method 500 includes performing a point in a polygonalgorithm to determine if the location associated with the message isactually inside the linked area of interest associated with theidentified geo-hash grid, as shown at block 508. In exemplaryembodiments, a point in polygon algorithm determines problem whether agiven point is located inside, outside, or on the boundary of a polygon.Various point in polygon algorithms are well known and any of thewell-known point in polygon algorithms, such as ray casting or anglesummation. Based on determining that the geo-hash of the message doesnot correspond to any of the geo-hash grids in the one or more geo-hashtrees, the method 500 includes discarding the message. Based ondetermining that the location associated with the message is inside anarea of interest associated with the identified geo-hash grid, themethod 500 includes forwarding the incoming message to the subscriberassociated with the geo-hash tree, as shown at block 510. Based ondetermining that the location associated with the message is outside thearea of interest associated with the identified geo-hash grid, themethod 500 includes discarding the message.

In exemplary embodiments, the method for routing messages based ongeolocation is capable of routing a large volume of geolocation messagesat predictably low latency with extremely high accuracy. In oneembodiment, the method for routing messages based on geolocationachieves 100% accuracy and has a 0% false positive and 0% false negativerate.

As will be appreciated by one skilled in the art, one or more aspects ofthe present invention may be embodied as a system, method or computerprogram product. Accordingly, one or more aspects of the presentinvention may take the form of an entirely hardware embodiment, anentirely software embodiment (including firmware, resident software,micro-code, etc.) or an embodiment combining software and hardwareaspects that may all generally be referred to herein as a “circuit,”“module” or “system”. Furthermore, one or more aspects of the presentinvention may take the form of a computer program product embodied inone or more computer readable medium(s) having computer readable programcode embodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readablestorage medium. A computer readable storage medium may be, for example,but not limited to, an electronic, magnetic, optical, electromagnetic,infrared or semiconductor system, apparatus, or device, or any suitablecombination of the foregoing. More specific examples (a non-exhaustivelist) of the computer readable storage medium include the following: anelectrical connection having one or more wires, a portable computerdiskette, a hard disk, a random access memory (RAM), a read-only memory(ROM), an erasable programmable read-only memory (EPROM or Flashmemory), an optical fiber, a portable compact disc read-only memory(CD-ROM), an optical storage device, a magnetic storage device, or anysuitable combination of the foregoing. In the context of this document,a computer readable storage medium may be any tangible medium that cancontain or store a program for use by or in connection with aninstruction execution system, apparatus, or device.

Program code, when created and stored on a tangible medium (includingbut not limited to electronic memory modules (RAM), flash memory,Compact Discs (CDs), DVDs, Magnetic Tape and the like is often referredto as a “computer program product”. The computer program product mediumis typically readable by a processing circuit preferably in a computersystem for execution by the processing circuit. Such program code may becreated using a compiler or assembler for example, to assembleinstructions, that, when executed perform aspects of the invention.

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of embodiments. Asused herein, the singular forms “a”, “an” and “the” are intended toinclude the plural forms as well, unless the context clearly indicatesotherwise. It will be further understood that the terms “comprises”and/or “comprising,” when used in this specification, specify thepresence of stated features, integers, steps, operations, elements,and/or components, but do not preclude the presence or addition of oneor more other features, integers, steps, operations, elements,components, and/or groups thereof.

The corresponding structures, materials, acts, and equivalents of allmeans or step plus function elements in the claims below are intended toinclude any structure, material, or act for performing the function incombination with other claimed elements as specifically claimed. Thedescription of embodiments have been presented for purposes ofillustration and description, but is not intended to be exhaustive orlimited to the embodiments in the form disclosed. Many modifications andvariations will be apparent to those of ordinary skill in the artwithout departing from the scope and spirit of the embodiments. Theembodiments were chosen and described in order to best explain theprinciples and the practical application, and to enable others ofordinary skill in the art to understand the embodiments with variousmodifications as are suited to the particular use contemplated.

Computer program code for carrying out operations for aspects of theembodiments may be written in any combination of one or more programminglanguages, including an object oriented programming language such asJava, Smalltalk, C++ or the like and conventional procedural programminglanguages, such as the “C” programming language or similar programminglanguages. The program code may execute entirely on the user's computer,partly on the user's computer, as a stand-alone software package, partlyon the user's computer and partly on a remote computer or entirely onthe remote computer or server. In the latter scenario, the remotecomputer may be connected to the user's computer through any type ofnetwork, including a local area network (LAN) or a wide area network(WAN), or the connection may be made to an external computer (forexample, through the Internet using an Internet Service Provider).

Aspects of embodiments are described above with reference to flowchartillustrations and/or schematic diagrams of methods, apparatus (systems)and computer program products according to embodiments. It will beunderstood that each block of the flowchart illustrations and/or blockdiagrams, and combinations of blocks in the flowchart illustrationsand/or block diagrams, can be implemented by computer programinstructions. These computer program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks.

These computer program instructions may also be stored in a computerreadable medium that can direct a computer, other programmable dataprocessing apparatus, or other devices to function in a particularmanner, such that the instructions stored in the computer readablemedium produce an article of manufacture including instructions whichimplement the function/act specified in the flowchart and/or blockdiagram block or blocks.

The computer program instructions may also be loaded onto a computer,other programmable data processing apparatus, or other devices to causea series of operational steps to be performed on the computer, otherprogrammable apparatus or other devices to produce a computerimplemented process such that the instructions which execute on thecomputer or other programmable apparatus provide processes forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments. In this regard, each block in the flowchart or blockdiagrams may represent a module, segment, or portion of code, whichcomprises one or more executable instructions for implementing thespecified logical function(s). It should also be noted that, in somealternative implementations, the functions noted in the block may occurout of the order noted in the figures. For example, two blocks shown insuccession may, in fact, be executed substantially concurrently, or theblocks may sometimes be executed in the reverse order, depending uponthe functionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts, or combinations of special purpose hardware andcomputer instructions.

What is claimed is:
 1. A computer program product for routing messagesbased on geolocation information, the computer program productcomprising: a tangible storage medium readable by a processing circuitand storing instructions for execution by the processing circuit forperforming a method comprising: receiving a message from a publisher;computing a geo-hash for the message based on a location associated withthe message; traversing one or more geo-hash trees associated with oneor more subscribers to determine if the geo-hash of the messagecorresponds to a geo-hash grid in the one or more geo-hash trees; basedon determining that the geo-hash of the message corresponds to anidentified geo-hash grid in the one or more geo-hash trees, performing apoint in a polygon algorithm to determine if the location associatedwith the message is inside an area of interest associated with theidentified geo-hash grid; and based on determining that the locationassociated with the message is inside the area of interest associatedwith the identified geo-hash grid, forwarding the message to one of theone or more subscribers associated with the geo-hash tree containing theidentified geo-hash grid.
 2. The computer program product of claim 1,wherein the each of the one or more geo-hash trees is created by:receiving a definition of an area of interest from one of the one ormore subscribers; computing geo-hashes for a plurality of points alongthe perimeter of the area of interest; comparing a common part of thegeo-hashes for the plurality of points along the perimeter of the areaof interest to find a geo-hash grid that contains the area of interest;and adding the geo-hash grid that contains the entire area of interestto the geo-hash tree associated with the one of the one or moresubscribers.
 3. The computer program product of claim 2, wherein thearea of interest is a polygon created by the one of the one or moresubscribers using a graphical user interface.
 4. The computer programproduct of claim 3, wherein the plurality of points along the perimeterof the area of interest includes each vertex of the polygon.
 5. Thecomputer program product of claim 1, wherein determining if the geo-hashof the message corresponds to the geo-hash grid in the one or moregeo-hash trees comprises performing a longest prefix match between thegeo-hash of the message and the geo-hash grids of the one or moregeo-hash trees.
 6. The computer program product of claim 1, furthercomprising based on determining that the geo-hash of the message doesnot corresponds to any of the geo-hash grids in the one or more geo-hashtrees, discarding the message.
 7. The computer program product of claim1, further comprising based on determining that the location associatedwith the message is outside the area of interest associated with theidentified geo-hash grid, discarding the message.
 8. A messaging systemfor routing messages based on geolocation information, the messagingsystem comprising a processor configured for performing a methodcomprising: receiving a message from a publisher; computing a geo-hashfor the message based on a location associated with the message;traversing one or more geo-hash trees associated with one or moresubscribers to determine if the geo-hash of the message corresponds to ageo-hash grid in the one or more geo-hash trees; based on determiningthat the geo-hash of the message corresponds to an identified geo-hashgrid in the one or more geo-hash trees, performing a point in a polygonalgorithm to determine if the location associated with the message isinside an area of interest associated with the identified geo-hash grid;and based on determining that the location associated with the messageis inside the area of interest associated with the identified geo-hashgrid, forwarding the message to one of the one or more subscribersassociated with the geo-hash tree containing the identified geo-hashgrid.
 9. The messaging system of claim 8, wherein the each of the one ormore geo-hash trees is created by: receiving a definition of an area ofinterest from one of the one or more subscribers; computing geo-hashesfor a plurality of points along the perimeter of the area of interest;comparing a common part of the geo-hashes for the plurality of pointsalong the perimeter of the area of interest to find a geo-hash grid thatcontains the area of interest; and adding the geo-hash grid thatcontains the entire area of interest to the geo-hash tree associatedwith the one of the one or more subscribers.
 10. The messaging system ofclaim 9, wherein the area of interest is a polygon created by the one ofthe one or more subscribers using a graphical user interface.
 11. Themessaging system of claim 10, wherein the plurality of points along theperimeter of the area of interest includes each vertex.
 12. Themessaging system of claim 8, wherein determining if the geo-hash of themessage corresponds to the geo-hash grid in the one or more geo-hashtrees comprises performing a longest prefix match between the geo-hashof the message and the geo-hash grids of the one or more geo-hash trees.13. The messaging system of claim 8, wherein the processor is furtherconfigured to discarding the message based on determining that thegeo-hash of the message does not corresponds to any of the geo-hashgrids in the one or more geo-hash trees.